package paginate

func GetOffset(page, perPage int64) int64 {
	if page < 1 {
		page = 1
	}
	if perPage < 1 {
		perPage = 20
	}
	return (page - 1) * perPage
}
